package com.sc.nft.entity.vo.ecology;

import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.UserEcologyCastUpperLimitDetailsTypeEnum;
import com.sc.nft.enums.UserEcologyReforgeUpperLimitDetailsTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
public class AdminUserEcologyReforgeUpperLimitPageVO {

    @ApiModelProperty(value = "类型")
    private UserEcologyReforgeUpperLimitDetailsTypeEnum type;

    @ApiModelProperty(value = "类型名称")
    private String typeName;

    @ApiModelProperty(value = "数量")
    private Integer useCount;

    @ApiModelProperty(value = "交易前数量")
    private Integer beforeCount;

    @ApiModelProperty(value = "交易后数量")
    private Integer afterCount;

    @ApiModelProperty(value = "是否是加 0:否 1:是")
    private Boolean isAdd;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    public void setTypeName(String typeName) {
        this.typeName = StrUtil.format("{}:{}", type.getDescription(), typeName);
    }
}
